<?php
/**
 * ExtGridColumnModelBase class file
 *
 * @author TrueSoftware B.V. (The Netherlands)
 * @link http://www.ext4yii.com
 * @copyright Copyright 2007-2010 TrueSoftwareB.V. all rights reserved.
 * @license http://www.ext4yii.com/license/
 *          EVALUATION VERSION - NOT FOR COMMERCIAL USE OR DISTRIBUTION.
 * @version 0.7.2
 */
 
 
class ExtGridColumnModelBase extends ExtObservable
{
    private $_gridcolumns_class_types = array('ExtGridColumnBase','ExtGridRowExpanderColumn');

    public function parseNode(ExtHTMLParserNode $node,
        ExtASTWalker $astwalker)
    {
        parent::parseNode($node, $astwalker);
        $this->parseGridColumnTypes($node, $astwalker);
        $node->shiftUp();
    }

    private function parseGridColumnTypes($node,$astwalker)
    {
        $columns = $node->findPropertyByName('gridcolumns');
        if(!is_null($columns) && ($this->parent instanceof ExtGridPanel))
        {
            $items=parent::parseNodeWidthTag($columns,
                $astwalker,
                true,
                array('asobject'=>false),
                $this,
                $this->_gridcolumns_class_types);

            $items = array_merge($this->parent->getAddedColumns(), $items);
            
            $this->setArrayConfig('columns',$items);
            $columns->shiftUp();
        }
    }

    public function createContainer(ExtHTMLParserNode $node)
    {
        return;
    }
}
?>
